import java.sql.SQLOutput;

public class Test {
    public static void main(String[] args) {
        new Thread(()->{
            for (; ; ) {
                System.out.println(" 汪汪汪");
                try {
                    Thread.sleep(1000);
                } catch (InterruptedException e) {
                    throw new RuntimeException(e);
                }
            }
        });
        new Thread(()->{
            for (; ; ) {
                System.out.println(" 喵喵喵");
                try {
                    Thread.sleep(1000);
                } catch (InterruptedException e) {
                    throw new RuntimeException(e);
                }
            }
        });
    }
}

class Dog implements Runnable {
    @Override
    public void run() {
        for (; ; ) {
            System.out.println(" 汪汪汪");
            try {
                Thread.sleep(1000);
            } catch (InterruptedException e) {
                throw new RuntimeException(e);
            }
        }
    }
}

class Cat implements Runnable {
    @Override
    public void run() {
        for (; ; ) {
            System.out.println(" 喵喵喵");
            try {
                Thread.sleep(1000);
            } catch (InterruptedException e) {
                throw new RuntimeException(e);
            }
        }
    }
}